package org.luxor.eshop.payment.entity.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.luxor.commons.core.validator.group.Group;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 商品库存
 *
 * @author Mr.Yan  @date: 2020/11/24
 */
@Data
public class CommodityDto {

    @ApiModelProperty(value = "商品编号")
    @NotBlank(message = "商品编号，不能为空", groups = Group.class)
    private String commodityCode;

    @ApiModelProperty(value = "购买数量")
    @NotNull(message = "购买数量，不能为空", groups = Group.class)
    private Integer quantity;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "商品单价")
    private BigDecimal commodityPrice;
}
